import React from "react";
import CryPto from "../view/CryPto"; // MD5加密
import Upload from "../view/Upload"; // 文件上传
import Login from "../view/Login";
import AuthRoute from "../components/AuthRoute";
import Home from "../view/Home";
import { createBrowserRouter } from "react-router-dom";
const routerConfig = createBrowserRouter([
  {
    path: "/",
    element: (
      <AuthRoute>
        <Home />
      </AuthRoute>
    ),
  },
  {
    element: <Home />,
    path: "/crypto",
    children: [
      {
        element: <CryPto />,
        path: "/crypto",
      },
    ],
  },
  {
    element: <Upload />,
    path: "/upload",
  },
  {
    element: <Login />,
    path: "/login",
  },
]);
export default routerConfig;
